//
// Created by xiexiangping on 23-04-17
//
#ifndef VIDEOCOLLECTIONENCODE_H
#define VIDEOCOLLECTIONENCODE_H

#include "baseCollectionEncode.h"

class videoCollectionEncode : public baseCollectionEncode {
public:

    videoCollectionEncode() {}

    ~videoCollectionEncode() {}

private:

    bool initStream();

    void read();

    AVFrame* convert_yuyv422_to_yuv420p(AVFrame* src_frame);

    //编码原始数据
    AVPacket *encodeVideoFrame(AVCodecContext *codecCtx, AVFrame *frame);

    AVCodecContext* encoderCtx;
};

#endif // VIDEOCOLLECTIONENCODE_H
